package com.miao.sso.web.config;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 实现访问/直接跳转到login页面
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    public  void addViewControllers(ViewControllerRegistry registry){
           //直接访问前台页面
          registry.addViewController("/").setViewName("/login");
    }
}
